package com.clotingshoppos.modules.Shiro.service.impl;

import com.clotingshoppos.modules.Shiro.repository.RoleRepository;
import com.clotingshoppos.modules.Shiro.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import com.clotingshoppos.modules.Shiro.repository.UserRepository;
import org.springframework.stereotype.Service;

/**
 * @ClassName: UserServiceImpl
 * @Description:
 * @Author: Izzat
 * @Date: 2019-04-16 14:14
 * @Version: v1.0
 */
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private UserRepository userRepository;
    @Autowired
    private RoleRepository roleRepository;

    @Override
    public String getRole(String username) {
        String Role = userRepository.getRole(username);
        return Role;
    }

    @Override
    public String getRoleName(String roleId) {
        return roleRepository.getRoleName(roleId);
    }
}
